 DATA: 3 zipped files.
 
1) RAW DATA: The raw data in Z-tree format are included in the folder RawData.zip. These are the raw data produced by Z-tree, in .XLS and .sbj format. These data files are then saved in .xlsx format and imported in Stata. The variable definitions for the choice data are also included in this folder, in the file ``codebook.pdf.''
 
 
2) DATA CLEANING: The DataCleaning.zip folder,  includes the .xlsx files and the Stata code (Stata 17 version) used to clean the raw data, bringing the data in Stata format. The folder includes:
--  The raw data saved in .xlsx format. For each session, they include a file with the choice data  and a file for the anonymous survey post-session. These are the data to be imported in Stata, for the analysis. The files are called SessionYTX.xlsx and SurveySessionYTX.xlsx  where Y=1,2,3 refers to the session and X=1,...,7 refers to the treatment.
-- The Stata executable ``0-Data-Cleaning.do'': puts together the database from the  .XLSX data files. It creates the ``Union-data.dta'' file (not included).
-- The Stata executable ``1-DataPrep'': uses Union-data.dta to clean up unneeded variables and construct needed variables.  The variable definitions are added as labels to this file. It creates the  ``workingdata.dta'' file, which is then used in the analysis.

3) DATA ANALYSIS: the DataAnalysis.zip folder includes the Stata code used to do the analysis The folder includes:
-- The file workingdata.dta, with the cleaned data in Stata format.
-- The Stata executable ``2-Analysis.do'': uses the workingdata.dta file and generates the regression tables, the statistical analyses, and the figures contained in the Results section of the paper. 
-- The log file of the analysis.

The analysis can be reproduced by placing workingdata.dta file in a directory and then running the program 2-Analysis.do.

4) Z_Tree_Program: this includes the z-tree program used in the laboratory, the earnigs.ztt program to determine payments and the matching24.txt file that is needed for the matching process. 
The explanation on how to modify the variables for the different treatments is included in the program itself in the globals.do component of the program.

To execute the program:
- Copy the file matching24.txt in the directory where the z-tree programs are located (same directory as ztree executable)
-Open ztree 3.5.1
-Open zleafs (24 zleafs)
-Within ztree, open the program
-Within ztree, click on Run -> client�s table
-Within ztree, click on Run -> summary table
-Within ztree, click on Run -> globals table
The press F5 to start
After the experiment ends (block 5 is finished) and all PC says "ready" client's table, do the random number choice of the block to be paid.  Then input it in the program earnings.ztt and then  run it by pressing F5. For example, if block 4 is selected go into subjects do and write 4 in 
// PARAMETER
randBlock = 4
